<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="sasa/shopping.css"/>
		<link rel="stylesheet" type="text/css" href="font_2856337_7iodyk0ox68/iconfont.css"/>
	</head>
	<body>
		<!-- 头部 -->
			<header></header>
		<!-- 右侧边栏 -->
			<aside></aside>
		<!-- 中间 -->
		<div id="center">
			<div id="center-left">
				<div id="center-center">
					<p> <i class="iconfont icon-duihao" style="font-size: 2rem;"></i>商品已成功加入购物车<span> 当前购物车共<span class="number" style="font-size: 100%;">1</span>件, 金额总计：<b>￥59.00</b></span></p>
				</div>
				<br>
				<a href="shopping.html" class="sum" >去购物车结算</a>
				<a href="list.html" class="sum">返回继续操作</a>
			</div>
			<div class="center-right">
				<div id="gouw">
					<p>我的购物车</p>
				</div>
			
				<ul class="sz">
				</ul>
				<div id="center-boootm">
					<a href="">当前购物车共<span>3</span>件, 金额总计：<strong>￥4397.00</strong></a>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		<!-- 底部 -->
			<footer></footer>
	</body>
</html>
<script src="js/jQuery.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	//引入头部
	$("header").load("head.html");
	// 右引入侧边栏
	$("aside").load("sidebar.html");
	//引入尾部
	$("footer").load("footer.html");
	
	function GetQueryString(name){
	    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	    var r = window.location.search.substr(1).match(reg);
	    if(r!=null)return  unescape(r[2]); return null;
	}
	let a = GetQueryString("id")
		$.ajax({
			url:"./php/getGoodsInfo.php",
			type:"get",
			data:{
					goodsId:'001'
			    },
			success:function(resText){
				getData(resText);
			}
		});

		function getData(resText){
			let data = JSON.parse(resText);

			let odl = $("<li></li>")
			if(data.goodsId == GetQueryString("id")){
				odl.html(
				`
				<li>
					<a href=""><img src="${data.goodsImg}" ></a>
					<div class="nr">
						<strong>${data.goodsName}</strong>
						<p>${data.goodsDesc}</p>
						<strong class="text">${data.goodsPrice}*<span>1</span></strong>
					</div>
					
				</li>
				`
				).appendTo($(".sz"))
			}
		}
</script>